ENT.Base = "base_point"
ENT.Type = "point"

function ENT:OnRoundChange()
	if !GAMEMODE:IsFight() then return end
	if GAMEMODE:GetRoundNumber() == self:GetKeyValue ("wave", 1) then
		printd ("firing wave output", self.Entity)
		self:Fire( "FireUser1", "", 0 )
	elseif (GAMEMODE:GetRoundNumber() >= self:GetKeyValue ("wave", 1)) and self:GetKeyValue ("dolaterwaves", 0) == 1 then
		printd ("firing wave output again", self.Entity)
		self:Fire( "FireUser1", "", 0 )
	end
end
GAMEMODE:AddEntityHook( "RoundChanged", "inc_wavereached", "OnRoundChange" )

function ENT:GetKeyValue( key, default )
	if ( !self.KeyValues || !self.KeyValues[ key ] ) then return default end
	return self.KeyValues[ key ]
end

function ENT:KeyValue( key, value )
	self.KeyValues = self.KeyValues or {}
	self.KeyValues[ key ] = tonumber(value) or value
end
